home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 6.6 KB | 399 lines | [TEXT/MPS ] |
- ;
- ; File: Resources.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__RESOURCES__') = 'UNDEFINED' THEN
- __RESOURCES__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
- include 'MixedMode.a'
- ENDIF
-
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
- include 'Files.a'
- ENDIF
- ; include 'OSUtils.a' ;
- ; include 'Memory.a' ;
-
- resSysHeap EQU 64 ;System or application heap?
- resPurgeable EQU 32 ;Purgeable resource?
- resLocked EQU 16 ;Load it in locked?
- resProtected EQU 8 ;Protected?
- resPreload EQU 4 ;Load in on OpenResFile?
- resChanged EQU 2 ;Resource changed?
- mapReadOnly EQU 128 ;Resource file read-only
- mapCompact EQU 64 ;Compact resource file
- mapChanged EQU 32 ;Write map out at update
- kResFileNotOpened EQU -1 ;ref num return as error when opening a resource file
- kSystemResFile EQU 0 ;this is the default ref num to the system file
-
- IF GENERATING68K THEN
- _InitResources: OPWORD $A995
- ELSE
- IMPORT InitResources
- ENDIF
-
- IF GENERATING68K THEN
- _RsrcZoneInit: OPWORD $A996
- ELSE
- IMPORT RsrcZoneInit
- ENDIF
-
- IF GENERATING68K THEN
- _CloseResFile: OPWORD $A99A
- ELSE
- IMPORT CloseResFile
- ENDIF
-
- IF GENERATING68K THEN
- _ResError: OPWORD $A9AF
- ELSE
- IMPORT ResError
- ENDIF
-
- IF GENERATING68K THEN
- _CurResFile: OPWORD $A994
- ELSE
- IMPORT CurResFile
- ENDIF
-
- IF GENERATING68K THEN
- _HomeResFile: OPWORD $A9A4
- ELSE
- IMPORT HomeResFile
- ENDIF
-
- IF GENERATING68K THEN
- _CreateResFile: OPWORD $A9B1
- ELSE
- IMPORT CreateResFile
- ENDIF
-
- IF GENERATING68K THEN
- _OpenResFile: OPWORD $A997
- ELSE
- IMPORT OpenResFile
- ENDIF
-
- IF GENERATING68K THEN
- _UseResFile: OPWORD $A998
- ELSE
- IMPORT UseResFile
- ENDIF
-
- IF GENERATING68K THEN
- _CountTypes: OPWORD $A99E
- ELSE
- IMPORT CountTypes
- ENDIF
-
- IF GENERATING68K THEN
- _Count1Types: OPWORD $A81C
- ELSE
- IMPORT Count1Types
- ENDIF
-
- IF GENERATING68K THEN
- _GetIndType: OPWORD $A99F
- ELSE
- IMPORT GetIndType
- ENDIF
-
- IF GENERATING68K THEN
- _Get1IndType: OPWORD $A80F
- ELSE
- IMPORT Get1IndType
- ENDIF
-
- IF GENERATING68K THEN
- _SetResLoad: OPWORD $A99B
- ELSE
- IMPORT SetResLoad
- ENDIF
-
- IF GENERATING68K THEN
- _CountResources: OPWORD $A99C
- ELSE
- IMPORT CountResources
- ENDIF
-
- IF GENERATING68K THEN
- _Count1Resources: OPWORD $A80D
- ELSE
- IMPORT Count1Resources
- ENDIF
-
- IF GENERATING68K THEN
- _GetIndResource: OPWORD $A99D
- ELSE
- IMPORT GetIndResource
- ENDIF
-
- IF GENERATING68K THEN
- _Get1IndResource: OPWORD $A80E
- ELSE
- IMPORT Get1IndResource
- ENDIF
-
- IF GENERATING68K THEN
- _GetResource: OPWORD $A9A0
- ELSE
- IMPORT GetResource
- ENDIF
-
- IF GENERATING68K THEN
- _Get1Resource: OPWORD $A81F
- ELSE
- IMPORT Get1Resource
- ENDIF
-
- IF GENERATING68K THEN
- _GetNamedResource: OPWORD $A9A1
- ELSE
- IMPORT GetNamedResource
- ENDIF
-
- IF GENERATING68K THEN
- _Get1NamedResource: OPWORD $A820
- ELSE
- IMPORT Get1NamedResource
- ENDIF
-
- IF GENERATING68K THEN
- _LoadResource: OPWORD $A9A2
- ELSE
- IMPORT LoadResource
- ENDIF
-
- IF GENERATING68K THEN
- _ReleaseResource: OPWORD $A9A3
- ELSE
- IMPORT ReleaseResource
- ENDIF
-
- IF GENERATING68K THEN
- _DetachResource: OPWORD $A992
- ELSE
- IMPORT DetachResource
- ENDIF
-
- IF GENERATING68K THEN
- _UniqueID: OPWORD $A9C1
- ELSE
- IMPORT UniqueID
- ENDIF
-
- IF GENERATING68K THEN
- _Unique1ID: OPWORD $A810
- ELSE
- IMPORT Unique1ID
- ENDIF
-
- IF GENERATING68K THEN
- _GetResAttrs: OPWORD $A9A6
- ELSE
- IMPORT GetResAttrs
- ENDIF
-
- IF GENERATING68K THEN
- _GetResInfo: OPWORD $A9A8
- ELSE
- IMPORT GetResInfo
- ENDIF
-
- IF GENERATING68K THEN
- _SetResInfo: OPWORD $A9A9
- ELSE
- IMPORT SetResInfo
- ENDIF
-
- IF GENERATING68K THEN
- _AddResource: OPWORD $A9AB
- ELSE
- IMPORT AddResource
- ENDIF
-
- IF GENERATING68K THEN
- _GetResourceSizeOnDisk: OPWORD $A9A5
- ELSE
- IMPORT GetResourceSizeOnDisk
- ENDIF
-
- IF GENERATING68K THEN
- _GetMaxResourceSize: OPWORD $A821
- ELSE
- IMPORT GetMaxResourceSize
- ENDIF
-
- IF GENERATING68K THEN
- _RsrcMapEntry: OPWORD $A9C5
- ELSE
- IMPORT RsrcMapEntry
- ENDIF
-
- IF GENERATING68K THEN
- _SetResAttrs: OPWORD $A9A7
- ELSE
- IMPORT SetResAttrs
- ENDIF
-
- IF GENERATING68K THEN
- _ChangedResource: OPWORD $A9AA
- ELSE
- IMPORT ChangedResource
- ENDIF
-
- IF GENERATING68K THEN
- _RemoveResource: OPWORD $A9AD
- ELSE
- IMPORT RemoveResource
- ENDIF
-
- IF GENERATING68K THEN
- _UpdateResFile: OPWORD $A999
- ELSE
- IMPORT UpdateResFile
- ENDIF
-
- IF GENERATING68K THEN
- _WriteResource: OPWORD $A9B0
- ELSE
- IMPORT WriteResource
- ENDIF
-
- IF GENERATING68K THEN
- _SetResPurge: OPWORD $A993
- ELSE
- IMPORT SetResPurge
- ENDIF
-
- IF GENERATING68K THEN
- _GetResFileAttrs: OPWORD $A9F6
- ELSE
- IMPORT GetResFileAttrs
- ENDIF
-
- IF GENERATING68K THEN
- _SetResFileAttrs: OPWORD $A9F7
- ELSE
- IMPORT SetResFileAttrs
- ENDIF
-
- IF GENERATING68K THEN
- _OpenRFPerm: OPWORD $A9C4
- ELSE
- IMPORT OpenRFPerm
- ENDIF
-
- IF GENERATING68K THEN
- _RGetResource: OPWORD $A80C
- ELSE
- IMPORT RGetResource
- ENDIF
-
- IF SystemSevenOrLater THEN
- IF GENERATING68K THEN
- _HOpenResFile: OPWORD $A81A
- ELSE
- IMPORT HOpenResFile
- ENDIF
-
- ELSE
- ENDIF
- IF SystemSevenOrLater THEN
- IF GENERATING68K THEN
- _HCreateResFile: OPWORD $A81B
- ELSE
- IMPORT HCreateResFile
- ENDIF
-
- ELSE
- ENDIF
- IF GENERATING68K THEN
- Macro
- _FSpOpenResFile
- moveq #13,d0
- dc.w $AA52
- EndM
- ELSE
- IMPORT FSpOpenResFile
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _FSpCreateResFile
- moveq #14,d0
- dc.w $AA52
- EndM
- ELSE
- IMPORT FSpCreateResFile
- ENDIF
-
- ; partial resource calls
- IF GENERATING68K THEN
- Macro
- _ReadPartialResource
- moveq #1,d0
- dc.w $A822
- EndM
- ELSE
- IMPORT ReadPartialResource
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _WritePartialResource
- moveq #2,d0
- dc.w $A822
- EndM
- ELSE
- IMPORT WritePartialResource
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetResourceSize
- moveq #3,d0
- dc.w $A822
- EndM
- ELSE
- IMPORT SetResourceSize
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetNextFOND
- moveq #10,d0
- dc.w $A822
- EndM
- ELSE
- IMPORT GetNextFOND
- ENDIF
-
- ; Use TempInsertROMMap to force the ROM resource map to be
- ; inserted into the chain in front of the system. Note that
- ; this call is only temporary - the modified resource chain
- ; is only used for the next call to the resource manager.
- ; See IM IV 19 for more information.
- IF OLDROUTINENAMES THEN
- ENDIF
- ENDIF ; __RESOURCES__
-